package me.ereach.internalback.controller;

import me.ereach.internalback.mapper.VXHStudentMapper;
import me.ereach.internalback.viewmodel.VXHStudent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/sys")
public class CtrlVXHStudent {
    @Autowired
    private VXHStudentMapper vxhStudentMapper;

    @GetMapping("/student")
    public List<VXHStudent> getVXHStudent() {
        List<VXHStudent> vxhStudents = vxhStudentMapper.selectList(null);
        return vxhStudents;
    }
}
